GroupWaitForTrigger
A group starts a new move when the trigger condition is met.
Syntax
KsCommandStatus GroupWaitForTrigger(
int Index,
int TriggerIndex,
McBufferMode BufferMode
);
Parameters
Index: the index of a trigger target. Indexes are zero based. For example, if you want to use Group 0 to trigger Group 1 to do something, Index is 1.
TriggerIndex: the index of a trigger source. It is equal to the Index in SetTrigger. You can have up to 16 triggers.
BufferMode: the buffer mode. Triggers can either start immediately or be buffered. See the McBufferMode type.
- mcAborting: all queued moves are aborted. The target stops doing its current task, and starts to wait the trigger immediately. For example, if Group 1 (target) is doing MoveLinearAbsolute, and the trigger is
mcAborting, it will stop MoveLinearAbsolute. The group's state transitions to GroupMoving and the group starts to wait the trigger immediately. When the trigger condition is met, Group 1 starts its new move. - mcBuffered: the target keeps doing its task. After it finishes, it starts to wait the trigger. For example, if Group 1 (target) is doing MoveLinearAbsolute, and the trigger is
mcBuffered, it will continue doing MoveLinearAbsolute until it finishes, and then it starts to wait the trigger. When the trigger condition is met, Group 1 starts its new move. - mcCancel: the target keeps doing its current task. The trigger is not added to the queue.
Return value
Returns the KsCommandStatus structure.
Example
N/A
Requirements
| RT | Win32 | |
|---|---|---|
| Minimum supported version | 4.3 | 4.3 |
| Header | ksmotion.h | ksmotion.h |
| Library | KsApi_Rtss.lib | KsApi.lib |
See also